package com.tree.lang;

/**
 * @name: Node
 * @author: 李昂
 * @date: 2021-04-15 20:32
 * @description：Node
 * @update: 2021-04-15 20:32
 */
public class Node<key, value> {

    //存储键值
    public key k;
    //存储value值
    public value v;
    //存储左子树
    public Node left;
    //存储右子树
    public Node right;

    public Node(key k, value v, Node left, Node right) {
        this.k = k;
        this.v = v;
        this.left = left;
        this.right = right;
    }

    @Override
    public String toString() {
        return "Node{" +
                "k=" + k +
                ", v=" + v +
                '}';
    }
}
